Final Goal: Mapping Fulton County and Atlanta, GA Background: Exploring the New Great Migration occurring in the early 1970’s marking the significant return of Black Americans to the deep south. This marked the reversal of trends in which for the first time in approximately 60 years, more Black Americans moved to the Southern States than left it. The influx contributed to a burgeoning Black middle class. ” The economic recovery of the Southern United States in the 1970s was a continuation of a broader trend of Sunbelt growth/Sunbelt Boom, driven by economic development that created millions of jobs, a sharp contrast to job losses in the Northeast. This growth was fueled by the breakdown of de jure segregation, which opened new opportunities, along with the mechanization of agriculture and the expansion of low-value-added manufacturing jobs. However, this recovery occurred within a national context of economic challenges, including the stagflation of high inflation and unemployment, and continued dependence on commodity cycles and imported goods in the Southern economy”. [Lit Review] A second period of growth for the city of Atlanta as well as the surrounding metropolitan area occured following the 1996 Atlanta Olympics, the city experienced a significant population increase and diversification, with metro-area population nearly doubling by 2025 and the foreign-born population tripling by 2000, primarily due to boosted tourism and a booming economy. This period also marked accelerated gentrification and displacement, particularly in neighborhoods where construction for the Games took place, and contributed to a shift of the city’s Black population to the suburbs while metropolitan Black population continued to grow.Neighborhood transformation: This influx, fueled by economic growth and rising property values, has transformed historic Black neighborhoods like the Old Fourth Ward, East Atlanta, and Kirkwood into majority-white or racially mixed areas. The BeltLine’s influence: Development projects, particularly the Atlanta BeltLine, have accelerated gentrification by increasing demand for housing and driving up prices in adjacent neighborhoods. The BeltLine has been linked to potential displacement and exclusion of low-income households. Displacement of Black residents: Between 1980 and 2020, an estimated 22,000 Black residents were displaced from Atlanta, the fifth-highest loss among U.S. metro areas.
Theory:
Key dates: 1970-1980 New Great Migration 1996 Olympics 2005 Atlanta Beltline construction
Data: Census data from 1970, 1980, 1990, 2000, 2010, 2020 and ACS data, which was fully implemented in 2005,
Remember “option + command + i” to auto get the 3 backticks and the r within the squiggly lines
To tell r that you don’t want warnings or messages, just show me my code and the output #{r, message=F, warning=F}
install.packages("tidycensus")
install.packages("tidyverse")
install.packages("mapview")
install.packages("mapgl")
install.packages("TideHarmonics")
install.packages("rmarkdown")
install.packages("remotes", repos = "http://cran.us.r-project.org")
install.packages("tidyverse", repos = "http://cran.us.r-project.org")
install.packages("tidyr", repos = "http://cran.us.r-project.org")
#if you forget the quotes; highlight the word and select SHIFT + " to add quotes
#now load the libraries
library(tidycensus)
library(dplyr)
library(ggplot2)
library(sf)
library(tidyverse)
library(mapgl)
library(TideHarmonics)
library(mark)
#the sf package, (special features package) handles & analyzes spatial vector data.
Gather spatial data for North Carolina.
Part I: Examining Georgia This code begins with an examination of the poverty level, household income…across the census tracts of Georgia.
#using the assignment operator <- to get ASC data
#always start with geography; in this case county level #data; be sure to add the comma and then add another #variable
#Now tell R you have access; Use API Key; add to set up chunk
#ga_income_sf. < - get_acs
#Retrieves data/calls the get_acs() function, which downloads data from the U.S. Census Bureau's American Community Survey (ACS) via its API.
#Then assigns a variable using the <- operator (i.e., assigns the data returned by get_acs() to a new variable called ga_income_sf.
#the sf package, (special features package) handles & analyzes spatial vector data.Adding sf to the object tells R to provide vector data.
ga_income.sf <- get_acs(
geography = "county",
variables = "B19013_001", # this is the income variable in the ASC data
state = "GA",
year = 2023,
geometry = T
)
## | | | 0% | | | 1% | |= | 1% | |= | 2% | |== | 2% | |== | 3% | |== | 4% | |=== | 4% | |=== | 5% | |==== | 5% | |==== | 6% | |===== | 6% | |===== | 7% | |===== | 8% | |====== | 8% | |====== | 9% | |======= | 9% | |======= | 10% | |======= | 11% | |======== | 11% | |======== | 12% | |========= | 12% | |========= | 13% | |========= | 14% | |========== | 14% | |========== | 15% | |=========== | 15% | |=========== | 16% | |============ | 16% | |============ | 17% | |============ | 18% | |============= | 18% | |============= | 19% | |============== | 19% | |============== | 20% | |============== | 21% | |=============== | 21% | |=============== | 22% | |================ | 22% | |================ | 23% | |================ | 24% | |================= | 24% | |================= | 25% | |================== | 25% | |================== | 26% | |=================== | 26% | |=================== | 27% | |=================== | 28% | |==================== | 28% | |==================== | 29% | |===================== | 29% | |===================== | 30% | |===================== | 31% | |====================== | 31% | |====================== | 32% | |======================= | 32% | |======================= | 33% | |======================= | 34% | |======================== | 34% | |======================== | 35% | |========================= | 35% | |========================= | 36% | |========================== | 36% | |========================== | 37% | |========================== | 38% | |=========================== | 38% | |=========================== | 39% | |============================ | 39% | |============================ | 40% | |============================ | 41% | |============================= | 41% | |============================= | 42% | |============================== | 42% | |============================== | 43% | |============================== | 44% | |=============================== | 44% | |=============================== | 45% | |================================ | 45% | |================================ | 46% | |================================= | 46% | |================================= | 47% | |================================= | 48% | |================================== | 48% | |================================== | 49% | |=================================== | 49% | |=================================== | 50% | |=================================== | 51% | |==================================== | 51% | |==================================== | 52% | |===================================== | 52% | |===================================== | 53% | |===================================== | 54% | |====================================== | 54% | |====================================== | 55% | |======================================= | 55% | |======================================= | 56% | |======================================== | 56% | |======================================== | 57% | |======================================== | 58% | |========================================= | 58% | |========================================= | 59% | |========================================== | 59% | |========================================== | 60% | |========================================== | 61% | |=========================================== | 61% | |=========================================== | 62% | |============================================ | 62% | |============================================ | 63% | |============================================ | 64% | |============================================= | 64% | |============================================= | 65% | |============================================== | 65% | |============================================== | 66% | |=============================================== | 66% | |=============================================== | 67% | |=============================================== | 68% | |================================================ | 68% | |================================================ | 69% | |================================================= | 69% | |================================================= | 70% | |================================================= | 71% | |================================================== | 71% | |================================================== | 72% | |=================================================== | 72% | |=================================================== | 73% | |=================================================== | 74% | |==================================================== | 74% | |==================================================== | 75% | |===================================================== | 75% | |===================================================== | 76% | |====================================================== | 76% | |====================================================== | 77% | |====================================================== | 78% | |======================================================= | 78% | |======================================================= | 79% | |======================================================== | 79% | |======================================================== | 80% | |======================================================== | 81% | |========================================================= | 81% | |========================================================= | 82% | |========================================================== | 82% | |========================================================== | 83% | |========================================================== | 84% | |=========================================================== | 84% | |=========================================================== | 85% | |============================================================ | 85% | |============================================================ | 86% | |============================================================= | 86% | |============================================================= | 87% | |============================================================= | 88% | |============================================================== | 88% | |============================================================== | 89% | |=============================================================== | 89% | |=============================================================== | 90% | |=============================================================== | 91% | |================================================================ | 91% | |================================================================ | 92% | |================================================================= | 92% | |================================================================= | 93% | |================================================================= | 94% | |================================================================== | 94% | |================================================================== | 95% | |=================================================================== | 95% | |=================================================================== | 96% | |==================================================================== | 96% | |==================================================================== | 97% | |==================================================================== | 98% | |===================================================================== | 98% | |===================================================================== | 99% | |======================================================================| 99% | |======================================================================| 100%
ga_income.sf
## Simple feature collection with 159 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -85.60516 ymin: 30.35785 xmax: -80.84038 ymax: 35.00124
## Geodetic CRS: NAD83
## First 10 features:
## GEOID NAME variable estimate moe
## 1 13185 Lowndes County, Georgia B19013_001 55887 2180
## 2 13127 Glynn County, Georgia B19013_001 68546 3490
## 3 13051 Chatham County, Georgia B19013_001 69575 2045
## 4 13179 Liberty County, Georgia B19013_001 59013 2779
## 5 13073 Columbia County, Georgia B19013_001 96122 2881
## 6 13137 Habersham County, Georgia B19013_001 65622 3596
## 7 13089 DeKalb County, Georgia B19013_001 77683 1640
## 8 13157 Jackson County, Georgia B19013_001 85012 4632
## 9 13267 Tattnall County, Georgia B19013_001 52351 3672
## 10 13031 Bulloch County, Georgia B19013_001 56832 2700
## geometry
## 1 MULTIPOLYGON (((-83.48448 3...
## 2 MULTIPOLYGON (((-81.78263 3...
## 3 MULTIPOLYGON (((-81.3917 32...
## 4 MULTIPOLYGON (((-81.8244 32...
## 5 MULTIPOLYGON (((-82.44285 3...
## 6 MULTIPOLYGON (((-83.6816 34...
## 7 MULTIPOLYGON (((-84.34984 3...
## 8 MULTIPOLYGON (((-83.81768 3...
## 9 MULTIPOLYGON (((-82.23371 3...
## 10 MULTIPOLYGON (((-82.02684 3...
#Using geometry = TRUE in a function that operates on an sf object, requires that the output retain its spatial geometry. #The function will return an sf object, which includes both the attribute data and the corresponding geometric features (points, lines, polygons, etc.). #Using geometry = FALSE discards the spatial geometry and only keep the attribute data. #The function will return a standard R data frame (or tibble) containing only the non-geometry columns.
View(ga_income.sf)
View(ga_income.sf)
plot(ga_income.sf['estimate'])
plot(ga_income.sf)
ga_fulton_income.sf. <- get_acs (
geography = "tract",
state = "GA",
county = "Fulton",
variable = "B19013_001",
year = 2023,
geometry = T
)
## Getting data from the 2019-2023 5-year ACS
## Downloading feature geometry from the Census website. To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
## | | | 0% | |= | 1% | |== | 2% | |== | 3% | |=== | 4% | |==== | 5% | |==== | 6% | |===== | 7% | |====== | 8% | |====== | 9% | |======= | 10% | |======== | 11% | |======== | 12% | |========= | 12% | |========= | 13% | |========== | 14% | |========== | 15% | |=========== | 15% | |=========== | 16% | |============ | 17% | |============ | 18% | |============= | 18% | |============= | 19% | |============== | 20% | |============== | 21% | |=============== | 21% | |=============== | 22% | |================ | 23% | |================ | 24% | |================= | 24% | |================= | 25% | |================== | 26% | |=================== | 26% | |=================== | 27% | |==================== | 28% | |==================== | 29% | |===================== | 29% | |===================== | 30% | |====================== | 31% | |====================== | 32% | |======================= | 32% | |======================= | 33% | |======================== | 34% | |======================== | 35% | |========================= | 35% | |========================= | 36% | |========================== | 37% | |=========================== | 38% | |=========================== | 39% | |============================ | 40% | |============================= | 41% | |============================= | 42% | |============================== | 43% | |=============================== | 44% | |=============================== | 45% | |================================ | 46% | |================================= | 47% | |================================= | 48% | |================================== | 49% | |=================================== | 50% | |==================================== | 51% | |===================================== | 52% | |===================================== | 53% | |====================================== | 54% | |======================================= | 55% | |======================================= | 56% | |======================================== | 57% | |========================================= | 58% | |========================================= | 59% | |========================================== | 60% | |=========================================== | 61% | |=========================================== | 62% | |============================================ | 62% | |============================================ | 63% | |============================================= | 64% | |============================================= | 65% | |============================================== | 65% | |============================================== | 66% | |=============================================== | 67% | |=============================================== | 68% | |================================================ | 68% | |================================================ | 69% | |================================================= | 70% | |================================================= | 71% | |================================================== | 71% | |================================================== | 72% | |=================================================== | 73% | |=================================================== | 74% | |==================================================== | 74% | |==================================================== | 75% | |===================================================== | 76% | |====================================================== | 76% | |====================================================== | 77% | |======================================================= | 78% | |======================================================= | 79% | |======================================================== | 79% | |======================================================== | 80% | |========================================================= | 81% | |========================================================= | 82% | |========================================================== | 82% | |========================================================== | 83% | |=========================================================== | 84% | |=========================================================== | 85% | |============================================================ | 85% | |============================================================ | 86% | |============================================================= | 87% | |============================================================== | 88% | |============================================================== | 89% | |=============================================================== | 90% | |================================================================ | 91% | |================================================================ | 92% | |================================================================= | 93% | |================================================================== | 94% | |================================================================== | 95% | |=================================================================== | 96% | |==================================================================== | 97% | |==================================================================== | 98% | |===================================================================== | 98% | |===================================================================== | 99% | |======================================================================| 100%
View(ga_fulton_income.sf.)
ga_fulton_income.sf.
## Simple feature collection with 327 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -84.85071 ymin: 33.50251 xmax: -84.09769 ymax: 34.18629
## Geodetic CRS: NAD83
## First 10 features:
## GEOID NAME variable estimate
## 1 13121010601 Census Tract 106.01; Fulton County; Georgia B19013_001 64844
## 2 13121008301 Census Tract 83.01; Fulton County; Georgia B19013_001 34983
## 3 13121002400 Census Tract 24; Fulton County; Georgia B19013_001 40612
## 4 13121006400 Census Tract 64; Fulton County; Georgia B19013_001 51302
## 5 13121002900 Census Tract 29; Fulton County; Georgia B19013_001 104776
## 6 13121980000 Census Tract 9800; Fulton County; Georgia B19013_001 NA
## 7 13121003700 Census Tract 37; Fulton County; Georgia B19013_001 NA
## 8 13121000700 Census Tract 7; Fulton County; Georgia B19013_001 147045
## 9 13121008203 Census Tract 82.03; Fulton County; Georgia B19013_001 NA
## 10 13121009604 Census Tract 96.04; Fulton County; Georgia B19013_001 74338
## moe geometry
## 1 13056 MULTIPOLYGON (((-84.4686 33...
## 2 8369 MULTIPOLYGON (((-84.47144 3...
## 3 20815 MULTIPOLYGON (((-84.43354 3...
## 4 18253 MULTIPOLYGON (((-84.37848 3...
## 5 4273 MULTIPOLYGON (((-84.37433 3...
## 6 NA MULTIPOLYGON (((-84.4403 33...
## 7 NA MULTIPOLYGON (((-84.41132 3...
## 8 49877 MULTIPOLYGON (((-84.43237 3...
## 9 NA MULTIPOLYGON (((-84.4925 33...
## 10 29658 MULTIPOLYGON (((-84.38733 3...
plot(ga_fulton_income.sf.['estimate'])
library(viridis)
III: IMPROVING THE MAP
Produce the map using ggplot2 Data visualization: Uses ggplot2 to create a map from the nc_mecklenburg_income_sf dataset, using the spatial data from the Census) containing income estimates by census tract.
Map formatting: -geom_sf() renders the geographic boundaries with income data mapped by colors** See below -white borders set by (color = “white”) with thin lines (size =0.1) seperate each tract -the “magma color palette (purple to yellow) represents income levels -legend is titled”Median Household INcome” -theme_minimal() applies a pre-built theme that removes the default settings -custom theme changes include: plot.title = element_text(face = “bold”, size = 16) plot.subtitle = element_text(size = 12) axis.title = element_blank() removes the x and y axis lables legend.position = “right”
#The + at the end of a line of code indicates that the code continues. # And indicates that the statement is incomplete and continues on the next line. #This is common when constructing complex expressions or function calls that span multiple lines for readability. #And frequently used in ggplot2 package when building plots layer by layer #And each + connects a new layer or aesthetic to the plot object.
ggplot(ga_fulton_income.sf.)+
geom_sf(aes(fill = estimate), color = "white", size = 0.1)+
scale_fill_viridis(option ="magma", name = "Median Household Income", labels = scales::dollar_format(scale = 0.001, suffix = "K", accuracy = 1)) +
labs(
title = "Median Household Income in Fulton County, GA",
subtitle = "By Census Tract(2023)",
caption = "Data: American Community Survey 5-Year Estimates",
)+
theme_minimal()+
theme(
plot.title = element_text(face ="bold",size = 16),
plot.subtitle = element_text(size = 10),
axis.title = element_blank(),
legend.position = "right"
)
library(mapview)
mapview(
ga_fulton_income.sf.,
zcol = "estimate"
)
ga_poverty_level <- get_acs(
geography = "county",
variables = "B06012_001", #Place of Birth by Poverty Status in the Past 12 Months
state = "GA",
year = 2023,
geometry = T
)
## Getting data from the 2019-2023 5-year ACS
## Downloading feature geometry from the Census website. To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
ga_poverty_level
## Simple feature collection with 159 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -85.60516 ymin: 30.35785 xmax: -80.84038 ymax: 35.00124
## Geodetic CRS: NAD83
## First 10 features:
## GEOID NAME variable estimate moe
## 1 13185 Lowndes County, Georgia B06012_001 114549 192
## 2 13127 Glynn County, Georgia B06012_001 83655 123
## 3 13051 Chatham County, Georgia B06012_001 286444 424
## 4 13179 Liberty County, Georgia B06012_001 64111 189
## 5 13073 Columbia County, Georgia B06012_001 158446 299
## 6 13137 Habersham County, Georgia B06012_001 44429 159
## 7 13089 DeKalb County, Georgia B06012_001 749492 1042
## 8 13157 Jackson County, Georgia B06012_001 79849 180
## 9 13267 Tattnall County, Georgia B06012_001 19639 83
## 10 13031 Bulloch County, Georgia B06012_001 74599 414
## geometry
## 1 MULTIPOLYGON (((-83.48448 3...
## 2 MULTIPOLYGON (((-81.78263 3...
## 3 MULTIPOLYGON (((-81.3917 32...
## 4 MULTIPOLYGON (((-81.8244 32...
## 5 MULTIPOLYGON (((-82.44285 3...
## 6 MULTIPOLYGON (((-83.6816 34...
## 7 MULTIPOLYGON (((-84.34984 3...
## 8 MULTIPOLYGON (((-83.81768 3...
## 9 MULTIPOLYGON (((-82.23371 3...
## 10 MULTIPOLYGON (((-82.02684 3...
plot(ga_poverty_level['estimate'])
ga_fulton_poverty_level <- get_acs (
geography = "tract",
state = "GA",
county = "Fulton",
variable = "B06012_001",# "Place of Birth by Poverty Status in the Past 12 Months"
year = 2023,
geometry = T
)
## Getting data from the 2019-2023 5-year ACS
## Downloading feature geometry from the Census website. To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
ga_poverty_level
## Simple feature collection with 159 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -85.60516 ymin: 30.35785 xmax: -80.84038 ymax: 35.00124
## Geodetic CRS: NAD83
## First 10 features:
## GEOID NAME variable estimate moe
## 1 13185 Lowndes County, Georgia B06012_001 114549 192
## 2 13127 Glynn County, Georgia B06012_001 83655 123
## 3 13051 Chatham County, Georgia B06012_001 286444 424
## 4 13179 Liberty County, Georgia B06012_001 64111 189
## 5 13073 Columbia County, Georgia B06012_001 158446 299
## 6 13137 Habersham County, Georgia B06012_001 44429 159
## 7 13089 DeKalb County, Georgia B06012_001 749492 1042
## 8 13157 Jackson County, Georgia B06012_001 79849 180
## 9 13267 Tattnall County, Georgia B06012_001 19639 83
## 10 13031 Bulloch County, Georgia B06012_001 74599 414
## geometry
## 1 MULTIPOLYGON (((-83.48448 3...
## 2 MULTIPOLYGON (((-81.78263 3...
## 3 MULTIPOLYGON (((-81.3917 32...
## 4 MULTIPOLYGON (((-81.8244 32...
## 5 MULTIPOLYGON (((-82.44285 3...
## 6 MULTIPOLYGON (((-83.6816 34...
## 7 MULTIPOLYGON (((-84.34984 3...
## 8 MULTIPOLYGON (((-83.81768 3...
## 9 MULTIPOLYGON (((-82.23371 3...
## 10 MULTIPOLYGON (((-82.02684 3...
BASIC ESTIMATE OF POVERTY LEVEL IN FULTON COUNTY The Official Poverty Measure The U.S. Census Bureau uses poverty thresholds set by the federal government that vary by:
Family size Number of children under 18 Age of householder (under or over 65)
How it’s measured A family is classified as “below poverty” if their total pre-tax cash income falls below the threshold for their specific family composition. For example, in 2023, the poverty threshold for a family of four with two children was around $29,960. What you’ll see in census data Census data typically shows:
Number/percentage below poverty level - those whose income is below 100% of the threshold Poverty ratio categories - often broken into ranges like under 50% of poverty level, 50-99%, 100-149%, 150-199%, and 200%+ of poverty level Income-to-poverty ratio - shows household income as a percentage of the poverty threshold
IMPORTANT NOTES
The thresholds are updated annually for inflation They don’t vary by geographic location (same threshold in rural Mississippi as in San Francisco) They only count cash income, not non-cash benefits like SNAP or housing assistance The Census also produces a Supplemental Poverty Measure that accounts for more factors
The main variable codes for poverty level data in the Census depend on which dataset you’re using: American Community Survey (ACS) / Decennial Census:
POVPIP - Poverty status (income-to-poverty ratio) as a percentage (e.g., 150 means 150% of poverty threshold) POVERTY - Poverty status recode showing categorized poverty levels
For tables (Summary Files):
B17001 - Poverty status in the past 12 months by sex and age B17002 - Ratio of income to poverty level in the past 12 months B17003 - Poverty status by sex by age (detailed) B17010 - Poverty status by family type B17017 - Poverty status by household type C17002 - Ratio of income to poverty level (collapsed version)
Public Use Microdata Sample (PUMS):
POVPIP - Income-to-poverty ratio recode (percentage) GRPIP - Gross rent as a percentage of household income
Decennial Census (older):
P159 (2000 Census) - Poverty status Various P-tables for poverty by demographic characteristics
IMPORTANT NOTES The exact variable codes can differ between:
Which year of data you’re accessing Whether you’re using microdata (individual records) vs. summary tables The API vs. downloaded files
plot(ga_fulton_poverty_level['estimate']) # estimate is the column name you should
library(viridis)
ggplot(ga_fulton_poverty_level)+
geom_sf(aes(fill = estimate), color = "white", size = 0.1)+
scale_fill_viridis(option ="magma", name = "Estimated Poverty Levels", labels = scales::dollar_format(scale = 0.001, suffix = "K", accuracy = 1)) +
labs(
title = "Estimated Poverty Levels in Fulton County, GA",
subtitle = "By Census Tract(2023)",
caption = "Data: American Community Survey 5-Year Estimates",
)+
theme_minimal()+
theme(
plot.title = element_text(face ="bold",size = 16),
plot.subtitle = element_text(size = 10),
axis.title = element_blank(),
legend.position = "right"
)
mapview(
ga_fulton_poverty_level,
zcol = "estimate"
)
mapview(
ga_fulton_poverty_level,
zcol = "estimate",
alpha.regions = 0.35 # adjust transparency here
)